package com.lzw.blog.Controller;

import com.lzw.blog.Service.MessageBoardService;
import com.lzw.blog.dao.pojo.MessageBoard;
import com.lzw.blog.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("MessageBoard")
public class MessageBoardController {
    @Autowired
    private MessageBoardService messageBoardService;
    //添加评论
    @PostMapping("plusadd")
    public Result plusadd(@RequestBody MessageBoard messageBoard){
        return messageBoardService.add(messageBoard);
    }
    //查询留言
    @GetMapping
    public Result select(){
        return messageBoardService.select();
    }
}
